/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package compilador;

import java.io.*;
import java_cup.runtime.Symbol;

/**
 *
 * @author hp
 */
public class Main {
    static boolean do_debug_parse = false;
    static TablasSimbolos tabla = new TablasSimbolos();
    static public void main(String[] args) throws java.io.IOException {
		parser parser_obj = new parser(new Scanner(new FileReader(System.getProperty("user.dir")+"/src/compilador/ENTRADA.txt"),tabla));
		Symbol parse_tree = null;
		try {
			if (do_debug_parse) {
                        parse_tree = parser_obj.debug_parse();
                    }
			else {
                        parse_tree = parser_obj.parse();
                    }
                            System.out.println("Entrada correcta");
                            tabla.imprimir();
		} catch (Exception e) {
                            System.out.println("Entrada incorrecta");
		}

    }
}
